<!doctype html>
<html ng-app="base">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="../../build/common/ngEdit.css" rel="stylesheet">
		<script type="text/javascript" src="../../build/common/ngEdit.js"></script>
		<script type="text/javascript">
			var Controller = ['$scope','baseService',function(scope,baseService){
				var defer = baseService.postForm(__ctx+"/bpm/instance/getInstanceOpinion",{instId:window.passData.instanceId});		
				$.getResultData(defer,function(data){
					scope.opinionList = data;
				})
				
				scope.getByStatus = function(status){
					if(status == 'create')return "待审批";
					if(status == 'start')return "发起流程";
					if(status == 'against')return "反对";
					if(status == 'reject')return "驳回";
					if(status == 'manualEnd')return "人工终止";
					if(status == 'end')return "终止";
					if(status == 'agree')return "同意";
					return status;
				}
			}];
			
			function isValidate(){
				$.Dialog.close(window);
				return false ;
			}
		</script>
	</head>
	<body class="panel success" ng-controller="Controller">
			<table class="form-table" style="margin-top: 5px">
				<tdead>
					<tr>
						<td></td>
						<td style="widtd:10%;min-widtd: 150px;">任务名称</td>
						<td style="widtd:10%;min-widtd: 130px;">任务创建时间</td>
						<td style="widtd:10%;min-widtd: 130px;">处理时间</td>
						<td style="widtd:30%;">待执行人</td>
						<td style="widtd:10%;min-widtd: 55px;">执行人</td>
						<td style="widtd:10%;min-widtd: 63px;">处理状态</td>
						<td style="widtd:12%;min-widtd: 130px;">备注/意见</td>
					</tr>
				</tdead>
				<tr ng-repeat = "o in opinionList">
					<td style="widtd:26px;">{{index+1}}</td>
					<td style="widtd:10%;min-widtd: 150px;">{{o.taskName}}</td>
					<td style="widtd:10%;min-widtd: 130px;">{{o.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
					<td style="widtd:10%;min-widtd: 130px;">{{o.approveTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
					<td style="widtd:30%;">{{o.assignInfo}}</td>
					<td style="widtd:10%;min-widtd: 55px;">{{o.approverName}}</td>
					<td style="widtd:10%;min-widtd: 63px;"><span ng-bind="getByStatus(o.status)"></span></td>
					<td style="widtd:12%;min-widtd: 130px;">{{o.opinion}}</td>
				</tr>
			</table>
	</body>
</html>